﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using System.Linq;
using CrystalDecisions.Shared;
using CrystalDecisions.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;

namespace INHOADON_TAMVAN.BaoCao
{
    public partial class frmBCTamNgon : DevExpress.XtraEditors.XtraForm
    {
        ParameterField paraField;
        ParameterFields paraFields = new ParameterFields();
        ParameterDiscreteValue paraDiscreteValue;
        public void PassParameter(string parameterFieldName, string parameterDiscreteValue, CrystalReportViewer viewer)
        {
            paraField = new ParameterField();
            paraField.Name = parameterFieldName;//tên c?a parameter
            paraDiscreteValue = new ParameterDiscreteValue();
            paraDiscreteValue.Value = parameterDiscreteValue;//gán giá tr? cho parameter
            paraField.CurrentValues.Add(paraDiscreteValue);
            paraFields.Add(paraField);
            viewer.ParameterFieldInfo = paraFields;
        }
        public frmBCTamNgon()
        {
            InitializeComponent();
        }

        private void frmBCTamNgon_Load(object sender, EventArgs e)
        {

        }
    }
}